# Maintainer: Justin Kromlinger <hashworks@archlinux.org>
pkgname=zim-tools
pkgver=3.3.0
pkgrel=1
pkgdesc="Various ZIM command line tools"
license=('GPL3')
arch=('loong64' 'x86_64')
provides=('zimwriterfs')
conflicts=('zimwriterfs')
replaces=('zimwriterfs')
depends=('file' 'libzim>=9.0.0' 'docopt' 'gumbo-parser')
makedepends=('meson' 'mustache')
url='https://github.com/openzim/zim-tools'
source=("${pkgname}-${pkgver}.tar.gz::${url}/archive/${pkgver}.tar.gz")
sha256sums=('306bec256418d6e2caac1955076627440c40144f2552957412108c7883b50576')

build() {
	cd "${pkgname}-${pkgver}"
	arch-meson build
	ninja -C build
}

package() {
	install -Dm644 "${pkgname}-${pkgver}/LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
	cd "${pkgname}-${pkgver}/build"
	DESTDIR="${pkgdir}" ninja install
}
